/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.srcptit.trainning.giangnd.btvn1;

import java.util.Scanner;

/**
 *
 * @author GIANG
 */
public class B4 {
    static boolean ngto(int n) {
		if (n < 2)
			return false;
		for (int i = 2; i <= Math.sqrt(n); i++)
			if (n % i == 0)
				return false;
		return true;
	}

	static void lietke() {
		int i = 2, dem = 0, n;
		Scanner sc = new Scanner(System.in);
		System.out.println("n=");
		n = sc.nextInt();
		while (dem != n) {
			if (ngto(i)) {
				System.out.print(i + " ");
				dem++;
			}
			i++;
		}
	}

	public static void main(String args[]) {
		lietke();
	}

}
